from django.conf.urls.defaults import patterns, include, url

urlpatterns = patterns('',
    url(r'^account/login$', 'django.contrib.auth.views.login', {'template_name':'login.html'}, name='login'),
)

urlpatterns += patterns('wox.views',
    url(r'^machine/add$', 'machine_add', name='machine_add'),
    url(r'^machine/update/(?P<machine_id>\d+)$', 'machine_update', name='machine_update'),
    url(r'^machine/delete/(?P<machine_id>\d+)$', 'machine_delete', name='machine_delete'),
    url(r'^machine/list$', 'machine_list', name='machine_list'),
    url(r'^machine/show/(?P<machine_id>\d+)$', 'machine_show', name='machine_show'),
    url(r'^machine/search$', 'machine_search', name='machine_search'),
    url(r'^reserve/add/(?P<machine_id>\d+)$','reserve_add', name='reserve_add'),
    url(r'^reserve/del/(?P<machine_id>\d+)$','reserve_del', name='reserve_del'),
    url(r'^account/dologin$', 'do_login', name='do_login'),
    url(r'^account/logout$', 'account_logout', name='logout'),
    url(r'^account/register$', 'account_register', name='register'),
    url(r'^install/neti$', 'install', {'inst_type': 'neti'}, name='neti'),
    url(r'^install/osu$', 'install', {'inst_type': 'osu'}, name='osu'),
    url(r'^install/dtu$', 'install', {'inst_type': 'dtu'}, name='dtu'),
    url(r'^exec$', 'execution', name='execution'),
    url(r'^exec/do_exec$', 'do_exec', name='do_exec'),
    url(r'^install/do_neti$', 'do_neti', name='do_neti'),
    url(r'^install/do_osuordtu$', 'do_osuordtu', name='do_osuordtu'),
    url(r'^install/ajax/getbnomgrp$', 'ajax_getbnomgrp', name='ajax_getbnomgrp'),
    url(r'^install/ajax/getmlst/(?P<ltype>\w+)$', 'ajax_getmlst', name='ajax_getmlst'),
    url(r'^status/inst$', 'status_inst', name='status_inst'),
    url(r'^status/neti$', 'status_inst', {'inst_type': 'neti'}, name='status_neti'),
    url(r'^status/osu$', 'status_inst', {'inst_type': 'osu'}, name='status_osu'),
    url(r'^status/dtu$', 'status_inst', {'inst_type': 'dtu'}, name='status_dtu'),
    url(r'^status/test$', 'status_test', name='status_test'),
    url(r'^status/testsum$', 'status_testsum', name='status_testsum'),
    url(r'^report$', 'report', name='report'),
    url(r'^report/dashboard$', 'dashboard', name='dashboard'),
    url(r'^report/ajax/getcrpt$', 'ajax_getcreport', name='ajax_getcreport'),
    url(r'^report/ajax/getmgrp$', 'ajax_getdbmgrp', name='ajax_getdbmgrp'),
    url(r'^wsa/(?P<hostname>\w[\w-]*)$', 'wsa', name='wsa'),
    url(r'^bg/ai', 'do_bgai', name='do_bgai'),
    url(r'^bg/at', 'do_bgat', name='do_bgat'),
    url(r'^$', 'install', {'inst_type': 'osu'}, name='home'),
) 


